<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";

	request.setAttribute("webApp", basePath);
	request.setAttribute("web",
			request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + "/");
	request.setAttribute("lib", basePath + "lib/");
	if(request.getParameter("err")!=null){
		request.setAttribute("err",request.getParameter("err"));
	}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>创建客服账号</title>
<link rel="stylesheet" href="${lib}layui/font_layer.css">
<link rel="stylesheet" href="${lib}layui/css/layui.css">
<link rel="stylesheet" href="${lib}layui/layer.css">
<link rel="stylesheet"
	href="${lib}font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="${lib}buttons/css/buttons.css">
<link rel="stylesheet" href="${lib}liMarquee/css/liMarquee.css">
<link rel="stylesheet" href="${lib}layui/global.css" charset="utf-8">
<script type="text/javascript" src="${lib}jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript"
	src="${lib}liMarquee/js/jquery.liMarquee.js"></script>
<script type="text/javascript"
	src="${lib}jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script type="text/javascript" src="${lib}layui/layui.all.js"></script>
<style type="text/css">
.show-wd-list span {
	font-size: 18px;
	padding: 5px 10px;
	color: #393D49;
}

.layui-tag {
	border-radius: 3px;
	padding: 2px 5px;
	color: #FF5722;
	border: 1px solid #FF5722;
	background: #FFF;
	text-align: center;
}

.layui-tag-num {
	border-radius: 3px;
	padding: 2px 5px;
	color: #2F4056;
	border: 1px solid #2F4056;
	background: #FFF;
	text-align: center;
}

.layui-user-title:hover {
	color: #009688;
	transition: color 0.6s;
	cursor: pointer;
}

.layui-lt-show-div {
	height: 500px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.layui-btn-refresh {
	margin-left: 10px;
	display: none;
}

.layui-info-loading {
	margin-left: 10px;
}

.fly-logo {
	position: absolute;
	left: 15px;
	top: 11px;
}

.top_logo {
	max-height: 40px;
	max-width: 150px;
}
</style>
<script type="text/javascript">
	var err="${err}";
	$(function() {
		layui.form.render();
		if(err!=""){
			switch(err){
				case "nameTwo":layer.msg("名称重复");break;
				case "noName":layer.msg("请输入姓名");break;
				case "createErr":layer.msg("意外,创建失败");break;
			};
		}
	});
</script>
</head>

<body>
	<div class="fly-header layui-bg-black">
		<div class="layui-container">
			<a class="fly-logo" href="/"> <img
				src="${lib}imgs/luntan_logo.png" alt="资云论坛" class="top_logo">
			</a>
			<ul class="layui-nav fly-nav layui-hide-xs">
				<li
					class="layui-nav-item hvr-underline-from-center top-t-button btn-publish-question"
					style=""><a href="manager.jsp"><i class="layui-icon">&#xe606;</i>聊天</a></li>
				<li
					class="layui-nav-item hvr-underline-from-center top-t-button btn-link-answer"
					style=""><a href="log.jsp"><i class="layui-icon">&#xe60e;</i>历史记录</a></li>
			</ul>
		</div>
	</div>


	<div class="fly-panel fly-column">
		<div class="layui-container">
			<ul class="layui-clear">
				<li class="layui-hide-xs  "><a href="manager.jsp">聊天</a><i
					class="fly-mid"></i></li>
				<li class="layui-hide-xs "><a href="create.jsp">创建客服</a><i
					class="fly-mid"></i></li>
				<li class="layui-hide-xs "><a href="client.jsp">模拟客户</a></li>
			</ul>
		</div>
	</div>
	<div class="layui-container">
		<div class="layui-row layui-col-space15">
			<div class="layui-col-md12">
				<div class="fly-panel fly-signin">
					<div class="fly-panel-title">创建客服</div>
					<div class="fly-panel-main fly-signin-main layui-form"
						style="text-align: left;height: auto;">
						<form class="layui-form" action="system/register.c">
							<div class="layui-form-item">
								<label class="layui-form-label">客服姓名</label>
								<div class="layui-input-block">
									<input name="name" required="" lay-verify="required"
										placeholder="请输入一个客服名称..." autocomplete="off" class="layui-input"
										type="text">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">问候语</label>
								<div class="layui-input-block">
									<input name="greetings" 
										placeholder="聊天问候语,可不填。" autocomplete="off" class="layui-input"
										type="text">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-input-block">
									<button class="layui-btn" lay-submit="" lay-filter="formDemo">创建</button>
									<button type="reset" class="layui-btn layui-btn-primary">重置</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>


		</div>
	</div>
	<div class="fly-footer" style="background: #FFF;">
		<p>即时通讯 v1.0 by Mr.Li</p>

	</div>

</body>
</body>
</html>
